package cn.com.my.six;

public class T {

	public static void main(String[] args) {
		String str = "abssdf";
		boolean f = str.matches("^[a-zA-Z]*");
		System.out.println(f);

		String str2 = "1234567890B";
		String strSb = str2.substring(str2.length() - 1, str2.length());
		System.out.println(strSb);

		String str3 = "@";
		System.out.println(strSb.matches("^[a-zA-Z]*"));
		System.out.println(str3.matches("^[a-zA-Z]*"));
		
		System.out.println(strIsEnglish(str3));
		System.out.println(strIsEnglish(strSb));
		
		String str4 = "gkkkbc（停用2）";
		System.out.println(str4.contains("（停用）"));
	}

	public static boolean strIsEnglish(String word) {
		boolean sign = true; // 初始化标志为为'true'
		for (int i = 0; i < word.length(); i++) {
			if (!(word.charAt(i) >= 'A' && word.charAt(i) <= 'Z')
					&& !(word.charAt(i) >= 'a' && word.charAt(i) <= 'z')) {
				sign = false;
			}
		}
		return sign;
	}

}
